package cn.ztuo.bitrade.entity;

import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import javax.validation.constraints.NotBlank;

/**
 * 国际化配置表(SYS_LOCALIZATION)
 * 
 * @author Zane
 * @version 1.0.0 2019-12-03
 */
@Entity
@Data
@Table(name = "sys_localization")
@IdClass(SysLocalization.SysLocalizationKey.class)
public class SysLocalization implements java.io.Serializable {
    /** 版本号 */
    private static final long serialVersionUID = -2741037684715960957L;

    /* This code was generated by TableGo tools, mark 1 begin. */

    /** ID */
    @Id
    @Column(name = "ID", unique = true, nullable = false, length = 32)
    @NotBlank(message = "{SysLocalization.id.null}")
    private String id;

    /** 语种编码(ar_AE/en_US/ja_JP/ko_KR/zh_CN) */
    @Id
    @Column(name = "LOCALE", unique = true, nullable = false, length = 6)
    @NotBlank(message = "{SysLocalization.locale.null}")
    private String locale;

    /** 内容 */
    @Column(name = "CONTENT", nullable = true, length = 65535)
    @NotBlank(message = "{SysLocalization.content.null}")
    private String content;

    @Data
    public static class SysLocalizationKey implements java.io.Serializable {
        /** ID */
        private String id;

        /** 语种编码(ar_AE/en_US/ja_JP/ko_KR/zh_CN) */
        private String locale;

    }

}